<?
$r = "../";
require_once($r."_engine/header_nocache.php");
require_once($r."_engine/functions.php");
require_once($r."_engine/c_account.php");
require_once($r."_engine/c_resources_storage.php");


$account = GetActiveAccount();

$monitor = new CMonitor();
$monitor->LoadById($monitor_id);

if ($monitor->data["account_id"] != $account->id)
{
	// Another account should be activated
	RedirectToLogin();
}

$resource_prev_id = GetNextPrevRes($monitor_id, $resource_id, false, $is_prev_fake);
$resource_next_id = GetNextPrevRes($monitor_id, $resource_id, true,  $tmp);


if (!isset($do_hl)) $do_hl = 1;

/* Note: This is a security leak, should be changed */
if (!isset($dhl_type)) $dhl_type = DHL_TYPE_ALL_PAGE;

/* Note: This is a security leak, only for debug */
if (isset($dhl_type_test)) $dhl_type = $dhl_type_test;

$url_data = vars_to_url(array("monitor_id", "resource_id", 
	"resource_prev_id", "resource_next_id", "is_prev_fake",
	"do_hl", "dhl_type"));
?>
<head>
	<link rel="shortcut icon" href="<?=$r?>images/favicon.ico">
	<title><?=$monitor->data["title"]?> - Changes History</title>
</head>

<frameset rows="95,*" frameborder="0">
   	<frame name="fr_1" src="history_nav_panel.php?<?=$url_data?>" scrolling="No" noresize>
 	<frame name="fr_2" src="history_nav_page.php?<?=$url_data?>#w3m_0" scrolling="Yes">
</frameset>

